

package com.example.assign2_list;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class MessageReceiver2 extends BroadcastReceiver{

	@Override
	public void onReceive(Context ctx, Intent intent) {		
		String msg = intent.getStringExtra("message");
		Toast.makeText(ctx,msg,Toast.LENGTH_SHORT).show();
		
		Intent i = new Intent(ctx, StopAlarm.class);
		i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		ctx.startActivity(i);
	}
}

